<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html >
<head>
	<meta name="decorator" content="moduleEdit"/>
	<link rel="stylesheet"href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css"type="text/css">
	<script type="text/javascript" src="${staticPath}/js/jquery-dialog.js"></script>
	<script type="text/javascript" src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js"></script>
		<style type="text/css">
			h4{border-bottom:1px dotted #ccc; padding-bottom:10px; margin:0 0 15px; color:#b12028; font-size: 15px;}
		</style>
	<script type="text/javascript">
	
	$(document).ready(function() {
		
		$("#submitBill").click(function(){
			Oosp_Loading('正在提交，请稍等...');
			$("#intSalesnoForm").attr("action","${contextPath}/biz/intent/intSalesno/submit?navId=${navId}")
			$("#intSalesnoForm").submit();
		});

	});
	
	
	//清除合同签订人
	function cleanPurchaseBy(){
		$("#purchaseById").val("");
		$("#purchaseBy").val("");
	}
	function cleanGuarantor(){
		$("#guarantor").val("");
	}
	</script>
</head>
<body>
	<div class="Report_f">
		<div class="Report_f_1">
			<div class="Report_f_title_1">先申号新增</div>
	<form:form id="intSalesnoForm"  modelAttribute="intSalesno" action="${contextPath}/biz/intent/intSalesno/save?navId=${navId}" method="post" class="form-horizontal" role="form" >
				 <ul class="nav nav-tabs Report_f_title_2" id="myTab">
				 
				    <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
				    <li><a href="#workflow" data-toggle="tab">流程审批</a></li> 
			  		<li><a href="#diagram" data-toggle="tab">流程图</a></li>
				</ul>
				 	<div class="tab-content Report_f_title_3 ">
						<div class="tab-pane active" id="home">
							<div class="Report_f_title_4">
				
						<tags:message content="${message}"/>
						<form:hidden path="intentId" id="intentId" value="${intSalesno.intentId}"/>
						<form:hidden path="createBy" />
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="intentNo" class="col-sm-4 f_4">新签意向单号:</label>
								<div class="col-sm-8">
									<form:hidden path="id"/>
									<form:hidden path="status"/>
									<input type="hidden" name="intentNo" id="intentNo" value="${intSalesno.intAssociated.intentNo}">
									<input type="hidden" id="contractType" name="contractType" value="${contractType}"/>
									${intSalesno.intentNo}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="purchaseBy_lab" class="col-sm-4 f_4">采购申请人:</label>
							    <div class="col-sm-6 f_6">
											<div class="input-group">
												<input id="purchaseBy" name="purchaseBy" value="${intSalesno.purchaseBy}" type="hidden" />
												<input id="purchaseByName" readonly="true" value="${purchaseByName}" name="purchaseByName" maxlength="200" class="f_5" />
												<span class="input-group-addon f_time"><a href="javascript:void(0)" onclick="cleanPurchaseBy()"><i class="glyphicon glyphicon-remove"></i></a></span>
												<span class="input-group-btn">
													<button class="btn btn-default btn_3" id="userDialogMultiple"
														data-dialog="dialog" data-multiple="true"
														data-idField="purchaseBy" data-nameField="purchaseByName"
														data-authType="USER" type="button">选择</button>
												</span>
											</div>
								</div>
								
						 	</div>
						</div> 
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="area" class="col-sm-4 f_4">区域:</label>
								<div class="col-sm-8">
									${intSalesno.area}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="store" class="col-sm-4 f_4">门店:</label>
								<div class="col-sm-8">
									${intSalesno.store}
								</div>
						 	</div>
						</div>
					
						
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="floor" class="col-sm-4 f_4">楼层:</label>
								<div class="col-sm-8">
									${intSalesno.floor}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="entryDate" class="col-sm-4 f_4">进场日期</label>
								<div class="col-sm-8">
									 <div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" >
										<input id="entryDate" readonly="readonly"   name="entryDate" type="text"  class="f_5"
											value="<fmt:formatDate value="${intSalesno.entryDate}" pattern="yyyy-MM-dd"/>"/>
										<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
			                    		<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
			                    	</div>
								</div>
						 	</div>
						</div> 
							<div class="f_2">
							<div class="col-sm-6">
							    <label for="supplierName" class="col-sm-4 f_4">供应商名称:</label>
								<div class="col-sm-8">
									<form:hidden path="supplierId" value="${intSalesno.supplierId}"/>
										${intSalesno.supplierName}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="supplierNo" class="col-sm-4 f_4">供应商编码:</label>
								<div class="col-sm-8">
									${intSalesno.supplierNo}
								</div>
						 	</div>
						</div> 
						<div class="f_2">
							<label for="reasons" class="col-sm-2 f_4">先申号原因:</label>
							<div class="col-sm-10">
								<form:textarea id="reasons" path="reasons" htmlEscape="false" rows="4" class=" form-control f_11"/>
							</div>
						</div> 
							    <h4>合同目前状态</h4>
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="isLargeAdjust" class="col-sm-4 f_4">属于公司大型调整:</label>
								<div class="col-sm-8">
									<ossp:radio name="isLargeAdjust" id="isLargeAdjust" dictType="YESORNO" 
								defaultChecked="${intSalesno.isLargeAdjust}" ></ossp:radio>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="intentFinishTime" class="col-sm-4 f_4">意向批复时间:</label>
						 		<div class="col-sm-8">
									 <div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" >
										<input id="intentFinishTime" readonly="readonly" name="intentFinishTime" type="text"  class="f_5"
											value="<fmt:formatDate value="${intSalesno.intentFinishTime}" pattern="yyyy-MM-dd"/>"/>
										<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
			                    		<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
			                    	</div>
								</div>
								</div>
						</div> 
						<div class="f_2">
							<div class="col-sm-6">
							    <label for="feesPayTime" class="col-sm-4 f_4">费用缴纳时间:</label>
								<div class="col-sm-8">
									 <div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" >
										<input id="feesPayTime" readonly="readonly" name="feesPayTime" type="text"  class="f_5"
											value="<fmt:formatDate value="${intSalesno.feesPayTime}" pattern="yyyy-MM-dd"/>"/>
										<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
			                    		<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
			                    	</div>
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="paperReturnTime" class="col-sm-4 f_4">合同文本返回时间:</label>
								<div class="col-sm-8">
									 <div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" >
										<input id="paperReturnTime" readonly="readonly" name="paperReturnTime" type="text"  class="f_5"
											value="<fmt:formatDate value="${intSalesno.paperReturnTime}" pattern="yyyy-MM-dd"/>"/>
										<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
			                    		<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
			                    	</div>
								</div>
						 	</div>
						</div> 
						<div class="f_2">
						<div class="col-sm-6">
							<label for="isContractAct" class="col-sm-4 f_4">合同文本是否已成立:</label>
							<div class="col-sm-8">
									<ossp:radio name="isContractAct" id="isContractAct" dictType="YESORNO" 
								defaultChecked="${intSalesno.isContractAct}" ></ossp:radio>
								</div>
							
						</div> 
						</div> 
						 <div class="f_2">
							<label  class="col-sm-2 f_4">采购担保书:</label>
							<div class="col-sm-10">
								1.若供应商未能按本人承诺缴纳费用,本人承诺可从本人工资中扣除,直至供应商缴纳为止;<br>
								2.若合同未能按本人承诺返回,本人承诺可扣罚本人当月20%绩效工资;<br>
								3.若今后因无合同导致公司利益受损,如欠款无法追缴等,本人承诺承担一切经济责任和法律后果;
							</div>
						</div> 
						<div class="f_2">
							<div class="col-sm-6">
							    <label class="col-sm-4 f_4"></label>
								<div class="col-sm-8">
									
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="guarantor" class="col-sm-4 f_4">担保人:</label>
							    <div class="col-sm-6 f_6">
											<div class="input-group">
											<input id="guarantor"  name="guarantor"  value="${intSalesno.guarantor}" type="hidden" class="f_5" />
												<input id="guarantorByName" readonly="true" value="${guarantorByName}" name="guarantorByName" maxlength="200" class="f_5" />
												<span class="input-group-addon f_time"><a href="javascript:void(0)" onclick="cleanGuarantor()"><i class="glyphicon glyphicon-remove"></i></a></span>
												<span class="input-group-btn">
													<button class="btn btn-default btn_3" id="userDialogMultiple1"
														data-dialog="dialog" data-multiple="true"
														data-idField="guarantor" data-nameField="guarantorByName"
														data-authType="USER" type="button">选择</button>
												</span>
											</div>
								</div>
						   </div>
						</div>
						<div class="f_2">
							<label for="remarks" class="col-sm-2 f_4">备注:</label>
							<div class="col-sm-10">
								<form:hidden path="reviewNo"/>
								<form:textarea id="remarks" path="remarks" htmlEscape="false" rows="4" class="form-control f_11"/>
							</div>
						</div> 
						<div class="f_2">
						 	<div class="col-sm-6">
							    <label for="createBy" class="col-sm-4 f_4">提报人:</label>
								<div class="col-sm-8">
									${createByName}

								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="createTime" class="col-sm-4 f_4">提报时间:</label>
								<div class="col-sm-8">
									<input id="createTime" name="createTime" type="text" readonly="readonly" class="f_5"
										value="<fmt:formatDate value="${intSalesno.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
								</div>
						 	</div>
						</div>
						<div class="f_2">
						 	<div class="col-sm-6">
							    <label for="updateBy" class="col-sm-4 f_4">修改人:</label>
								<div class="col-sm-8">
									<form:hidden path="updateBy" class="f_5"/>
									${updateByName}
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="updateTime" class="col-sm-4 f_4">修改时间:</label>
								<div class="col-sm-8">
 									<input id="updateTime" name="updateTime" type="text" readonly="readonly" class="f_5"
										value="<fmt:formatDate value="${intSalesno.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
								</div>
						 	</div>
						</div>
							<div class="o-l-action">
						  <div class="col-sm-offset-2 col-sm-10">
						  	<input class="btn btn-info btn_3 btn_right" type="button" value="返 回" onclick="history.go(-1)"/>
						  	<c:if test="${intSalesno.status=='00'}">
						    <input class="btn btn-success btn_5 btn_right" type="submit"  value="保 存"/>
						    </c:if>
							<input class="btn btn-success btn_5 btn_right" type="button"  id="submitBill" value="提交"/>
						  </div>
						</div>
					
			
				  </div>
				  </div>
				  <div class="tab-pane" id="workflow"> 
						<c:import url="/WEB-INF/views/bpm/workflow/workFlowInfo_edit.jsp">
							<c:param name="formName" value="com.maoye.ossp.biz.intent.entity.IntSalesno" />
							<c:param name="flowKey" value="intSalesno" />
							<c:param name="businessId" value="${intSalesno.id}"/>
							<c:param name="method" value="${method}"/>
							<c:param name="isStart" value="${isStart}"/>
						</c:import> 			
					</div>
					<div class="tab-pane" id="diagram" style="overflow-x:auto;">
						<iframe id="diagram_iframe" scrolling="no" frameborder=0 width="100%">
						</iframe>
					</div>
				</div>
				</form:form>
				
				</div>			
			</div>

	<script type="text/javascript">
		$('.form_date').datetimepicker({
	        language:  'zh-CN',
	        weekStart: 1,
	        todayBtn:  1,
			autoclose: 1,
			todayHighlight: 1,
			startView: 2,
			minView: 2,
			forceParse: 0,
			format: 'yyyy-mm-dd',
			pickerPosition: "bottom-left"
	    });
		$("#intSalesnoForm").validate();
	</script>
</body>
</html>